package tests;

import xml.model.ClienteXML;
import xml.model.ItemVentaXML;
import xml.model.VentaXML;

import com.thoughtworks.xstream.XStream;

public class TestGenerarFactura {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ClienteXML clienteXML = new ClienteXML();
		clienteXML.setId(1);
		
		VentaXML ventaXML = new VentaXML();
		ItemVentaXML itemVentaXML = new ItemVentaXML();
		itemVentaXML.setCantidad(1);
		itemVentaXML.setCaracteristicas("1");
		itemVentaXML.setCodigo("11");
		itemVentaXML.setIdcotizacion(1);
		itemVentaXML.setMarca("1");
		itemVentaXML.setOrigen("1");
		
		ventaXML.setCliente(clienteXML);
		ventaXML.getListaItemVenta().add(itemVentaXML);
	
		XStream xstream = new XStream();
		xstream.alias("Venta", VentaXML.class);
		xstream.autodetectAnnotations(true);
		System.out.println(xstream.toXML(ventaXML));
	}

}
